<template>
  <div id="app">
    <keep-alive include="eventlist,eventdetails,eclist,advisorylist">
      <router-view/>
    </keep-alive>
  </div>
</template>

<script>

export default {
  name: 'App',
  watch: {
    '$route' (to) {
      switch (to.name) {
        case 'eventlist':
          document.title = '协会活动'
          break;
        case 'eclist':
          document.title = '会员企业'
          break;
        case 'advisorylist':
          document.title = '动态资讯'
          break;
        case 'eventdetails':
          document.title = '活动详情'
          break;
        case 'advisorydetails':
          document.title = '资讯详情'
          break;
      }
    }
  }
}
</script>
